﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;

namespace CRM.Infrastructure.EFCore.Mysql
{
    public partial class crmContext : DbContext
    {
        public crmContext()
        {
        }

        public crmContext(DbContextOptions<crmContext> options)
            : base(options)
        {
        }

        public virtual DbSet<Consumption> Consumptions { get; set; } = null!;
        public virtual DbSet<Customer> Customers { get; set; } = null!;
        public virtual DbSet<CustomerRecord> CustomerRecords { get; set; } = null!;
        public virtual DbSet<Customervip> Customervips { get; set; } = null!;
        public virtual DbSet<Order> Orders { get; set; } = null!;
        public virtual DbSet<OrderPay> OrderPays { get; set; } = null!;
        public virtual DbSet<OrderProduct> OrderProducts { get; set; } = null!;
        public virtual DbSet<Product> Products { get; set; } = null!;
        public virtual DbSet<ProductPackage> ProductPackages { get; set; } = null!;
        public virtual DbSet<ProductPackageDetail> ProductPackageDetails { get; set; } = null!;
        public virtual DbSet<ProductType> ProductTypes { get; set; } = null!;
        public virtual DbSet<Recharge> Recharges { get; set; } = null!;
        public virtual DbSet<Reservation> Reservations { get; set; } = null!;
        public virtual DbSet<Room> Rooms { get; set; } = null!;
        public virtual DbSet<Setmenu> Setmenus { get; set; } = null!;
        public virtual DbSet<SetmenuProduct> SetmenuProducts { get; set; } = null!;
        public virtual DbSet<SysActionLog> SysActionLogs { get; set; } = null!;
        public virtual DbSet<SysDepartment> SysDepartments { get; set; } = null!;
        public virtual DbSet<SysDepartmentDuty> SysDepartmentDuties { get; set; } = null!;
        public virtual DbSet<SysDictionary> SysDictionaries { get; set; } = null!;
        public virtual DbSet<SysDictionaryType> SysDictionaryTypes { get; set; } = null!;
        public virtual DbSet<SysDuty> SysDuties { get; set; } = null!;
        public virtual DbSet<SysErrorLog> SysErrorLogs { get; set; } = null!;
        public virtual DbSet<SysLoginLog> SysLoginLogs { get; set; } = null!;
        public virtual DbSet<SysRight> SysRights { get; set; } = null!;
        public virtual DbSet<SysRightConfig> SysRightConfigs { get; set; } = null!;
        public virtual DbSet<SysRightConfigDetail> SysRightConfigDetails { get; set; } = null!;
        public virtual DbSet<SysRightConfigOrg> SysRightConfigOrgs { get; set; } = null!;
        public virtual DbSet<SysUser> SysUsers { get; set; } = null!;
        public virtual DbSet<SysUserInfo> SysUserInfos { get; set; } = null!;
        public virtual DbSet<SysUserRight> SysUserRights { get; set; } = null!;
        public virtual DbSet<SysVerify> SysVerifies { get; set; } = null!;

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
                optionsBuilder.UseMySql("server=43.139.80.8;user id=root;password=CXL_1314520xm;database=crm", Microsoft.EntityFrameworkCore.ServerVersion.Parse("8.0.41-mysql"));
            }
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.UseCollation("utf8mb4_0900_ai_ci")
                .HasCharSet("utf8mb4");

            modelBuilder.Entity<Consumption>(entity =>
            {
                entity.HasKey(e => e.CId)
                    .HasName("PRIMARY");

                entity.ToTable("consumption");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.CId)
                    .HasMaxLength(32)
                    .HasColumnName("C_ID")
                    .HasComment("id");

                entity.Property(e => e.CCvipId)
                    .HasMaxLength(32)
                    .HasColumnName("C_CVip_Id")
                    .HasComment("会员id");

                entity.Property(e => e.CDateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_DateTime")
                    .HasComment("消费时间");

                entity.Property(e => e.CMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("C_Money")
                    .HasComment("消费金额");

                entity.Property(e => e.COrder)
                    .HasMaxLength(32)
                    .HasColumnName("C_Order")
                    .HasComment("消费订单");
            });

            modelBuilder.Entity<Customer>(entity =>
            {
                entity.HasKey(e => e.CId)
                    .HasName("PRIMARY");

                entity.ToTable("customer");

                entity.HasComment("客户表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.CId)
                    .HasMaxLength(32)
                    .HasColumnName("C_ID")
                    .HasComment("客户ID");

                entity.Property(e => e.CAddress)
                    .HasMaxLength(500)
                    .HasColumnName("C_Address")
                    .HasComment("地址");

                entity.Property(e => e.CAuthor)
                    .HasMaxLength(50)
                    .HasColumnName("C_Author")
                    .HasComment("创建人");

                entity.Property(e => e.CCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Create_Time")
                    .HasComment("添加时间");

                entity.Property(e => e.CDesc)
                    .HasMaxLength(255)
                    .HasColumnName("C_Desc")
                    .HasComment("备用");

                entity.Property(e => e.CFollowTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Follow_Time")
                    .HasComment("跟踪时间");

                entity.Property(e => e.CLevel)
                    .HasMaxLength(50)
                    .HasColumnName("C_Level")
                    .HasComment("级别");

                entity.Property(e => e.CName)
                    .HasMaxLength(32)
                    .HasColumnName("C_Name")
                    .HasComment("客户名字");

                entity.Property(e => e.CNextTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Next_Time")
                    .HasComment("下次联系时间");

                entity.Property(e => e.CPhone)
                    .HasMaxLength(20)
                    .HasColumnName("C_Phone")
                    .HasComment("电话");

                entity.Property(e => e.CQq)
                    .HasMaxLength(20)
                    .HasColumnName("C_QQ")
                    .HasComment("QQ");

                entity.Property(e => e.CRecord)
                    .HasMaxLength(50)
                    .HasColumnName("C_Record")
                    .HasComment("备案人");

                entity.Property(e => e.CRemark)
                    .HasMaxLength(500)
                    .HasColumnName("C_Remark")
                    .HasComment("备注");

                entity.Property(e => e.CResponsibility)
                    .HasMaxLength(50)
                    .HasColumnName("C_Responsibility")
                    .HasComment("负责人");

                entity.Property(e => e.CSchool)
                    .HasMaxLength(100)
                    .HasColumnName("C_School")
                    .HasComment("学校");

                entity.Property(e => e.CSeasTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Seas_Time")
                    .HasComment("进入公海时间");

                entity.Property(e => e.CSource)
                    .HasMaxLength(50)
                    .HasColumnName("C_Source")
                    .HasComment("来源");

                entity.Property(e => e.CStatus)
                    .HasColumnName("C_Status")
                    .HasComment("状态");

                entity.Property(e => e.CType)
                    .HasMaxLength(32)
                    .HasColumnName("C_Type")
                    .HasComment("客户类别");

                entity.Property(e => e.CUpdateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Update_Time")
                    .HasComment("最后更新时间");

                entity.Property(e => e.CWechat)
                    .HasMaxLength(100)
                    .HasColumnName("C_Wechat")
                    .HasComment("微信");

                entity.Property(e => e.CsuccessPercent)
                    .HasPrecision(10)
                    .HasColumnName("CSuccessPercent")
                    .HasComment("初始成功概率");
            });

            modelBuilder.Entity<CustomerRecord>(entity =>
            {
                entity.HasKey(e => e.CrId)
                    .HasName("PRIMARY");

                entity.ToTable("customer_record");

                entity.HasComment("客户跟进表")
                    .UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.CrId)
                    .HasMaxLength(32)
                    .HasColumnName("CR_ID")
                    .HasComment("跟进ID");

                entity.Property(e => e.CrAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("Cr_Author")
                    .HasComment("跟进人");

                entity.Property(e => e.CrCId)
                    .HasMaxLength(32)
                    .HasColumnName("CR_C_ID")
                    .HasComment("客户ID");

                entity.Property(e => e.CrContent)
                    .HasMaxLength(32)
                    .HasColumnName("CR_Content")
                    .HasComment("跟进内容");

                entity.Property(e => e.CrCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("CR_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.CrDate)
                    .HasColumnType("datetime")
                    .HasColumnName("CR_Date")
                    .HasComment("跟进日期");

                entity.Property(e => e.CrDesc)
                    .HasMaxLength(255)
                    .HasColumnName("CR_Desc");

                entity.Property(e => e.CrIsConvert)
                    .HasColumnName("CR_IsConvert")
                    .HasComment("是否转换");

                entity.Property(e => e.CrLocation)
                    .HasMaxLength(255)
                    .HasColumnName("Cr_Location")
                    .HasComment("地点");

                entity.Property(e => e.CrNextTime)
                    .HasColumnType("datetime")
                    .HasColumnName("CR_Next_Time")
                    .HasComment("下一次联系时间");

                entity.Property(e => e.CrNo)
                    .HasColumnName("CR_No")
                    .HasComment("该客户跟进次数");

                entity.Property(e => e.CrResult)
                    .HasMaxLength(255)
                    .HasColumnName("CR_Result")
                    .HasComment("跟进结果");

                entity.Property(e => e.CrSuccess)
                    .HasColumnName("CR_Success")
                    .HasComment("预估成功概率");
            });

            modelBuilder.Entity<Customervip>(entity =>
            {
                entity.HasKey(e => e.CvId)
                    .HasName("PRIMARY");

                entity.ToTable("customervip");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.CvId)
                    .HasMaxLength(32)
                    .HasColumnName("Cv_Id")
                    .HasComment("会员ID");

                entity.Property(e => e.CvAddress)
                    .HasMaxLength(999)
                    .HasColumnName("Cv_Address")
                    .HasComment("地址");

                entity.Property(e => e.CvBalance)
                    .HasPrecision(10, 2)
                    .HasColumnName("Cv_Balance")
                    .HasComment("余额");

                entity.Property(e => e.CvCareer)
                    .HasMaxLength(999)
                    .HasColumnName("Cv_Career")
                    .HasComment("职业");

                entity.Property(e => e.CvConsumptionAmount)
                    .HasPrecision(10, 2)
                    .HasColumnName("Cv_ConsumptionAmount")
                    .HasComment("消费金额");

                entity.Property(e => e.CvConsumptionGiftAmount)
                    .HasPrecision(10, 2)
                    .HasColumnName("Cv_ConsumptionGiftAmount")
                    .HasComment("消费赠送金额");

                entity.Property(e => e.CvCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("Cv_CreateTime")
                    .HasComment("消费时间");

                entity.Property(e => e.CvCreationTime)
                    .HasColumnType("datetime")
                    .HasColumnName("Cv_CreationTime")
                    .HasComment("会员注册时间");

                entity.Property(e => e.CvCustomerId)
                    .HasMaxLength(32)
                    .HasColumnName("Cv_CustomerId")
                    .HasComment("对应客户ID");

                entity.Property(e => e.CvDesc)
                    .HasMaxLength(999)
                    .HasColumnName("Cv_Desc");

                entity.Property(e => e.CvGiftAmount)
                    .HasPrecision(10, 2)
                    .HasColumnName("Cv_GiftAmount")
                    .HasComment("赠送金额");

                entity.Property(e => e.CvLastTime)
                    .HasColumnType("datetime")
                    .HasColumnName("Cv_LastTime")
                    .HasComment("最后消费时间");

                entity.Property(e => e.CvLevel)
                    .HasMaxLength(32)
                    .HasColumnName("Cv_Level")
                    .HasComment("会员等级");

                entity.Property(e => e.CvName)
                    .HasMaxLength(255)
                    .HasColumnName("Cv_Name")
                    .HasComment("会员名称");

                entity.Property(e => e.CvPhone)
                    .HasMaxLength(255)
                    .HasColumnName("Cv_Phone")
                    .HasComment("会员电话");

                entity.Property(e => e.CvQq)
                    .HasMaxLength(255)
                    .HasColumnName("Cv_Qq")
                    .HasComment("QQ");

                entity.Property(e => e.CvRechargeAmount)
                    .HasPrecision(10, 2)
                    .HasColumnName("Cv_RechargeAmount")
                    .HasComment("充值金额");

                entity.Property(e => e.CvResponsible)
                    .HasMaxLength(32)
                    .HasColumnName("Cv_Responsible")
                    .HasComment("负责人");

                entity.Property(e => e.CvTransactionCount)
                    .HasColumnName("Cv_TransactionCount")
                    .HasComment("消费次数");

                entity.Property(e => e.CvWechat)
                    .HasMaxLength(255)
                    .HasColumnName("Cv_Wechat")
                    .HasComment("微信");
            });

            modelBuilder.Entity<Order>(entity =>
            {
                entity.HasKey(e => e.OId)
                    .HasName("PRIMARY");

                entity.ToTable("order");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.OId)
                    .HasMaxLength(32)
                    .HasColumnName("O_ID")
                    .HasComment("id");

                entity.Property(e => e.OCount)
                    .HasColumnName("O_Count")
                    .HasComment("商品总数量");

                entity.Property(e => e.OCvipId)
                    .HasMaxLength(32)
                    .HasColumnName("O_CVip_ID")
                    .HasComment("订单对应会员");

                entity.Property(e => e.ODateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("O_DateTime")
                    .HasComment("订单时间");

                entity.Property(e => e.OIsFinish)
                    .HasColumnName("O_IsFinish")
                    .HasComment("是否完成");

                entity.Property(e => e.OMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("O_Money")
                    .HasComment("订单金额");

                entity.Property(e => e.OOpId)
                    .HasMaxLength(32)
                    .HasColumnName("O_OP_ID")
                    .HasComment("产品订单id");

                entity.Property(e => e.OPayModel)
                    .HasColumnName("O_Pay_Model")
                    .HasComment("支付模式");

                entity.Property(e => e.OPayMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("O_Pay_Money")
                    .HasComment("支付金额");

                entity.Property(e => e.OPayTime)
                    .HasColumnType("datetime")
                    .HasColumnName("O_Pay_Time")
                    .HasComment("支付时间");

                entity.Property(e => e.OPayment)
                    .HasColumnName("O_Payment")
                    .HasComment("是否支付");

                entity.Property(e => e.OPeople)
                    .HasColumnName("O_People")
                    .HasComment("人数");

                entity.Property(e => e.ORoom)
                    .HasMaxLength(255)
                    .HasColumnName("O_Room")
                    .HasComment("房间");
            });

            modelBuilder.Entity<OrderPay>(entity =>
            {
                entity.HasKey(e => e.Pid)
                    .HasName("PRIMARY");

                entity.ToTable("order_pay");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.Pid)
                    .HasMaxLength(32)
                    .HasColumnName("PID");

                entity.Property(e => e.PCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("P_CreateTime");

                entity.Property(e => e.PFinishTime)
                    .HasColumnType("datetime")
                    .HasColumnName("P_FinishTime");

                entity.Property(e => e.PIsFinish).HasColumnName("P_IsFinish");

                entity.Property(e => e.PMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("P_Money");

                entity.Property(e => e.PoId)
                    .HasMaxLength(32)
                    .HasColumnName("PO_ID");
            });

            modelBuilder.Entity<OrderProduct>(entity =>
            {
                entity.HasKey(e => e.OpId)
                    .HasName("PRIMARY");

                entity.ToTable("order_product");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.OpId)
                    .HasMaxLength(32)
                    .HasColumnName("OP_ID")
                    .HasComment("订单产品ID");

                entity.Property(e => e.ODateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("O_DateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.OId)
                    .HasMaxLength(32)
                    .HasColumnName("O_ID")
                    .HasComment("订单ID");

                entity.Property(e => e.OpCount)
                    .HasColumnName("OP_Count")
                    .HasComment("产品数量");

                entity.Property(e => e.OpIsPay).HasColumnName("OP_IsPay");

                entity.Property(e => e.OpMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("OP_Money")
                    .HasComment("产品单价");

                entity.Property(e => e.OpName)
                    .HasMaxLength(255)
                    .HasColumnName("OP_Name")
                    .HasComment("产品名称");

                entity.Property(e => e.OpPhoto)
                    .HasMaxLength(255)
                    .HasColumnName("OP_Photo")
                    .HasComment("图片地址");

                entity.Property(e => e.OpSum)
                    .HasPrecision(10, 2)
                    .HasColumnName("OP_Sum")
                    .HasComment("产品总价");

                entity.Property(e => e.PId)
                    .HasMaxLength(32)
                    .HasColumnName("P_ID")
                    .HasComment("产品ID");
            });

            modelBuilder.Entity<Product>(entity =>
            {
                entity.ToTable("products");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.ProductId)
                    .HasMaxLength(32)
                    .HasColumnName("product_id")
                    .HasComment("产品唯一标识符");

                entity.Property(e => e.DiscountPrice)
                    .HasPrecision(10, 2)
                    .HasColumnName("Discount_Price")
                    .HasComment("折扣价格");

                entity.Property(e => e.EndDatetime)
                    .HasColumnType("datetime")
                    .HasColumnName("End_Datetime")
                    .HasComment("折扣结束时间");

                entity.Property(e => e.Price)
                    .HasPrecision(10, 2)
                    .HasColumnName("price")
                    .HasComment("产品价格");

                entity.Property(e => e.ProductCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("product_CreateTime")
                    .HasDefaultValueSql("CURRENT_TIMESTAMP")
                    .HasComment("记录创建时间");

                entity.Property(e => e.ProductExplain)
                    .HasMaxLength(999)
                    .HasColumnName("product_Explain")
                    .HasComment("产品简介");

                entity.Property(e => e.ProductImg)
                    .HasMaxLength(999)
                    .HasColumnName("product_Img")
                    .HasComment("产品图片");

                entity.Property(e => e.ProductList)
                    .HasColumnName("product_List")
                    .HasComment("是否上架");

                entity.Property(e => e.ProductName)
                    .HasMaxLength(100)
                    .HasColumnName("product_name")
                    .HasComment("产品名称");

                entity.Property(e => e.ProductSalesVolume)
                    .HasColumnName("product_SalesVolume")
                    .HasComment("销量");

                entity.Property(e => e.StartDatetime)
                    .HasColumnType("datetime")
                    .HasColumnName("Start_Datetime")
                    .HasComment("折扣开始时间");

                entity.Property(e => e.TypeId)
                    .HasMaxLength(32)
                    .HasColumnName("type_id")
                    .HasComment("产品类型");
            });

            modelBuilder.Entity<ProductPackage>(entity =>
            {
                entity.HasKey(e => e.PpId)
                    .HasName("PRIMARY");

                entity.ToTable("product_package");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.PpId)
                    .HasMaxLength(32)
                    .HasColumnName("PP_ID")
                    .HasComment("套餐ID");

                entity.Property(e => e.PpBeginTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PP_BeginTime")
                    .HasComment("开始时间");

                entity.Property(e => e.PpCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PP_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.PpDesc)
                    .HasMaxLength(255)
                    .HasColumnName("PP_Desc");

                entity.Property(e => e.PpDiscount)
                    .HasColumnName("PP_Discount")
                    .HasComment("折扣");

                entity.Property(e => e.PpEndTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PP_EndTime")
                    .HasComment("结束时间");

                entity.Property(e => e.PpExplain)
                    .HasMaxLength(200)
                    .HasColumnName("PP_Explain")
                    .HasComment("描述");

                entity.Property(e => e.PpIsActive)
                    .HasColumnName("PP_IsActive")
                    .HasComment("是否上架");

                entity.Property(e => e.PpName)
                    .HasMaxLength(100)
                    .HasColumnName("PP_Name")
                    .HasComment("套餐名称");

                entity.Property(e => e.PpStock)
                    .HasColumnName("PP_Stock")
                    .HasComment("套餐数量,0为不限量");

                entity.Property(e => e.PpTotalPrice)
                    .HasColumnName("PP_Total_Price")
                    .HasComment("总价");
            });

            modelBuilder.Entity<ProductPackageDetail>(entity =>
            {
                entity.HasKey(e => e.PpdId)
                    .HasName("PRIMARY");

                entity.ToTable("product_package_details");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.PpdId)
                    .HasMaxLength(32)
                    .HasColumnName("PPD_ID")
                    .HasComment("详情ID");

                entity.Property(e => e.PpdPId)
                    .HasMaxLength(32)
                    .HasColumnName("PPD_P_ID")
                    .HasComment("产品ID");

                entity.Property(e => e.PpdPpId)
                    .HasMaxLength(32)
                    .HasColumnName("PPD_PP_ID")
                    .HasComment("套餐ID");

                entity.Property(e => e.PpdPrice)
                    .HasColumnName("PPD_Price")
                    .HasComment("单价");

                entity.Property(e => e.PpdQuantity)
                    .HasColumnName("PPD_Quantity")
                    .HasComment("数量");

                entity.Property(e => e.PpdTotalPrice)
                    .HasColumnName("PPD_Total_Price")
                    .HasComment("总价");
            });

            modelBuilder.Entity<ProductType>(entity =>
            {
                entity.HasKey(e => e.TypeId)
                    .HasName("PRIMARY");

                entity.ToTable("product_types");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.TypeId)
                    .HasMaxLength(32)
                    .HasColumnName("type_id")
                    .HasComment("产品类型唯一标识符");

                entity.Property(e => e.TypeCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("type_CreateTime")
                    .HasDefaultValueSql("CURRENT_TIMESTAMP")
                    .HasComment("记录创建时间");

                entity.Property(e => e.TypeName)
                    .HasMaxLength(100)
                    .HasColumnName("type_name")
                    .HasComment("产品类型名称");
            });

            modelBuilder.Entity<Recharge>(entity =>
            {
                entity.HasKey(e => e.RId)
                    .HasName("PRIMARY");

                entity.ToTable("recharge");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.RId)
                    .HasMaxLength(32)
                    .HasColumnName("R_ID")
                    .HasComment("充值ID");

                entity.Property(e => e.RCvipId)
                    .HasMaxLength(32)
                    .HasColumnName("R_CVip_ID")
                    .HasComment("充值会员ID");

                entity.Property(e => e.RDateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("R_DateTime")
                    .HasComment("充值时间");

                entity.Property(e => e.RDesc)
                    .HasMaxLength(999)
                    .HasColumnName("R_Desc")
                    .HasComment("充值备注");

                entity.Property(e => e.RMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("R_Money")
                    .HasComment("充值金额");
            });

            modelBuilder.Entity<Reservation>(entity =>
            {
                entity.HasKey(e => e.RId)
                    .HasName("PRIMARY");

                entity.ToTable("reservation");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.RId)
                    .HasMaxLength(32)
                    .HasColumnName("R_ID")
                    .HasComment("预约ID");

                entity.Property(e => e.RCvid)
                    .HasMaxLength(32)
                    .HasColumnName("R_CVID")
                    .HasComment("会员ID");

                entity.Property(e => e.RDateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("R_Date_Time")
                    .HasComment("预约时间");

                entity.Property(e => e.RRid)
                    .HasMaxLength(32)
                    .HasColumnName("R_RID")
                    .HasComment("房间ID");

                entity.Property(e => e.RStatus)
                    .HasColumnName("R_Status")
                    .HasComment("预约状态");

                entity.Property(e => e.RSum)
                    .HasColumnName("R_Sum")
                    .HasComment("人数");
            });

            modelBuilder.Entity<Room>(entity =>
            {
                entity.HasKey(e => e.RId)
                    .HasName("PRIMARY");

                entity.ToTable("room");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.RId)
                    .HasMaxLength(32)
                    .HasColumnName("R_ID")
                    .HasComment("房间ID");

                entity.Property(e => e.RDateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("R_Date_Time")
                    .HasComment("房间创建时间");

                entity.Property(e => e.RRoom)
                    .HasMaxLength(255)
                    .HasColumnName("R_Room")
                    .HasComment("房间名字");

                entity.Property(e => e.RState)
                    .HasColumnName("R_State")
                    .HasComment("房间状态");
            });

            modelBuilder.Entity<Setmenu>(entity =>
            {
                entity.HasKey(e => e.SId)
                    .HasName("PRIMARY");

                entity.ToTable("setmenu");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.SId)
                    .HasMaxLength(32)
                    .HasColumnName("S_ID")
                    .HasComment("套餐ID");

                entity.Property(e => e.SCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("S_Create_Time")
                    .HasComment("套餐创建时间");

                entity.Property(e => e.SList)
                    .HasColumnName("S_List")
                    .HasComment("是否上架");

                entity.Property(e => e.SMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("S_Money")
                    .HasComment("套餐价格");

                entity.Property(e => e.SName)
                    .HasMaxLength(255)
                    .HasColumnName("S_Name")
                    .HasComment("套餐名称");
            });

            modelBuilder.Entity<SetmenuProduct>(entity =>
            {
                entity.HasKey(e => e.SpId)
                    .HasName("PRIMARY");

                entity.ToTable("setmenu_product");

                entity.UseCollation("utf8mb4_0900_as_ci");

                entity.Property(e => e.SpId)
                    .HasMaxLength(32)
                    .HasColumnName("SP_ID");

                entity.Property(e => e.SpCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("SP_Create_Time")
                    .HasComment("创建时间");

                entity.Property(e => e.SpImg)
                    .HasMaxLength(255)
                    .HasColumnName("SP_Img")
                    .HasComment("图片");

                entity.Property(e => e.SpMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("SP_Money")
                    .HasComment("单价");

                entity.Property(e => e.SpPid)
                    .HasMaxLength(32)
                    .HasColumnName("SP_PID")
                    .HasComment("产品ID");

                entity.Property(e => e.SpSid)
                    .HasMaxLength(32)
                    .HasColumnName("SP_SID")
                    .HasComment("套餐ID");

                entity.Property(e => e.SpSum)
                    .HasColumnName("SP_Sum")
                    .HasComment("数量");

                entity.Property(e => e.SpSumMoney)
                    .HasPrecision(10, 2)
                    .HasColumnName("SP_Sum_Money")
                    .HasComment("总价");
            });

            modelBuilder.Entity<SysActionLog>(entity =>
            {
                entity.HasKey(e => e.Alid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_action_logs");

                entity.HasComment("行为日志表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Alid)
                    .HasMaxLength(32)
                    .HasColumnName("ALID")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Alaction)
                    .HasMaxLength(50)
                    .HasColumnName("ALAction")
                    .HasComment("行为")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.AlapiUrl)
                    .HasMaxLength(200)
                    .HasColumnName("ALApiUrl")
                    .HasComment("本次请求的接口地址")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.AlcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("ALCreateTime")
                    .HasComment("操作时间");

                entity.Property(e => e.Aldesc)
                    .HasMaxLength(255)
                    .HasColumnName("ALDesc")
                    .HasComment("备用")
                    .UseCollation("utf8mb4_0900_ai_ci");

                entity.Property(e => e.Alip)
                    .HasMaxLength(20)
                    .HasColumnName("ALIp")
                    .HasComment("本次请求的IP")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Alparams)
                    .HasMaxLength(999)
                    .HasColumnName("ALParams")
                    .HasComment("本次请求的参数")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Alresult)
                    .HasColumnName("ALResult")
                    .HasComment("操作结果");

                entity.Property(e => e.AlresultMessage)
                    .HasMaxLength(999)
                    .HasColumnName("ALResultMessage")
                    .HasComment("结果信息")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Altype)
                    .HasMaxLength(50)
                    .HasColumnName("ALType")
                    .HasComment("类型")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Aluid)
                    .HasMaxLength(32)
                    .HasColumnName("ALUID")
                    .HasComment("用户ID")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Alversion)
                    .HasMaxLength(10)
                    .HasColumnName("ALVersion")
                    .HasComment("记录版本：管理端/客户端")
                    .UseCollation("utf8mb4_general_ci");
            });

            modelBuilder.Entity<SysDepartment>(entity =>
            {
                entity.HasKey(e => e.DId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_department");

                entity.HasComment("部门表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DId)
                    .HasMaxLength(32)
                    .HasColumnName("D_ID")
                    .HasComment("部门ID");

                entity.Property(e => e.DCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("D_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.DDesc)
                    .HasMaxLength(255)
                    .HasColumnName("D_Desc")
                    .HasComment("备用");

                entity.Property(e => e.DExplain)
                    .HasMaxLength(255)
                    .HasColumnName("D_Explain")
                    .HasComment("描述");

                entity.Property(e => e.DIcon)
                    .HasMaxLength(50)
                    .HasColumnName("D_Icon")
                    .HasComment("图标代码");

                entity.Property(e => e.DIsBan)
                    .HasColumnName("D_IsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.DLv)
                    .HasColumnName("D_Lv")
                    .HasComment("部门等级");

                entity.Property(e => e.DName)
                    .HasMaxLength(50)
                    .HasColumnName("D_Name")
                    .HasComment("部门名称");

                entity.Property(e => e.DNo)
                    .HasColumnName("D_No")
                    .HasComment("序号");

                entity.Property(e => e.DParent)
                    .HasMaxLength(32)
                    .HasColumnName("D_Parent")
                    .HasComment("上级组织ID");
            });

            modelBuilder.Entity<SysDepartmentDuty>(entity =>
            {
                entity.HasKey(e => e.DdId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_department_duties");

                entity.HasComment("职务岗位关联表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.DdId)
                    .HasMaxLength(32)
                    .HasColumnName("DD_ID")
                    .HasComment("ID")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DdCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("DD_CreateTime")
                    .HasComment("时间");

                entity.Property(e => e.DdDeptId)
                    .HasMaxLength(32)
                    .HasColumnName("DD_DeptID")
                    .HasComment("部门ID");

                entity.Property(e => e.DdDutyId)
                    .HasMaxLength(32)
                    .HasColumnName("DD_DutyID")
                    .HasComment("组织ID");
            });

            modelBuilder.Entity<SysDictionary>(entity =>
            {
                entity.HasKey(e => e.DId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_dictionary");

                entity.UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DId)
                    .HasMaxLength(32)
                    .HasColumnName("D_ID")
                    .HasComment("字典ID");

                entity.Property(e => e.DAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("D_Author")
                    .HasComment("添加人");

                entity.Property(e => e.DCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("D_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.DDesc)
                    .HasMaxLength(255)
                    .HasColumnName("D_Desc");

                entity.Property(e => e.DDiscount)
                    .HasPrecision(10, 2)
                    .HasColumnName("D_Discount")
                    .HasComment("会员折扣");

                entity.Property(e => e.DDtId)
                    .HasMaxLength(32)
                    .HasColumnName("D_DT_ID")
                    .HasComment("类型ID");

                entity.Property(e => e.DExplain)
                    .HasMaxLength(255)
                    .HasColumnName("D_Explain")
                    .HasComment("描述");

                entity.Property(e => e.DName)
                    .HasMaxLength(99)
                    .HasColumnName("D_Name")
                    .HasComment("名称");

                entity.Property(e => e.DUpdateAuthor)
                    .HasColumnType("datetime")
                    .HasColumnName("D_Update_Author")
                    .HasComment("最后修改时间");

                entity.Property(e => e.DUseCount).HasColumnName("D_Use_Count");

                entity.Property(e => e.DValue)
                    .HasMaxLength(32)
                    .HasColumnName("D_Value")
                    .HasComment("值");
            });

            modelBuilder.Entity<SysDictionaryType>(entity =>
            {
                entity.HasKey(e => e.DtId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_dictionary_type");

                entity.HasComment("字典类型表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DtId)
                    .HasMaxLength(32)
                    .HasColumnName("DT_ID")
                    .HasComment("字典类型ID");

                entity.Property(e => e.DtAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("DT_Author")
                    .HasComment("添加人");

                entity.Property(e => e.DtCount)
                    .HasColumnName("DT_Count")
                    .HasComment("子级数量");

                entity.Property(e => e.DtCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("DT_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.DtDesc)
                    .HasMaxLength(255)
                    .HasColumnName("DT_Desc");

                entity.Property(e => e.DtExplain)
                    .HasMaxLength(255)
                    .HasColumnName("DT_Explain")
                    .HasComment("描述");

                entity.Property(e => e.DtKey)
                    .HasMaxLength(50)
                    .HasColumnName("DT_Key")
                    .HasComment("类型关键字");

                entity.Property(e => e.DtName)
                    .HasMaxLength(50)
                    .HasColumnName("DT_Name")
                    .HasComment("类型名称");

                entity.Property(e => e.DtUpdateAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("DT_Update_Author")
                    .HasComment("最后修改人");

                entity.Property(e => e.DtValue)
                    .HasMaxLength(99)
                    .HasColumnName("DT_Value")
                    .HasComment("类型值");
            });

            modelBuilder.Entity<SysDuty>(entity =>
            {
                entity.HasKey(e => e.DId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_duties");

                entity.HasComment("岗位表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DId)
                    .HasMaxLength(32)
                    .HasColumnName("D_ID")
                    .HasComment("职务ID");

                entity.Property(e => e.DCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("D_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.DDesc)
                    .HasMaxLength(255)
                    .HasColumnName("D_Desc")
                    .HasComment("备用");

                entity.Property(e => e.DExplain)
                    .HasMaxLength(255)
                    .HasColumnName("D_Explain")
                    .HasComment("描述");

                entity.Property(e => e.DIsBan)
                    .HasColumnName("D_IsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.DLv)
                    .HasColumnName("D_Lv")
                    .HasComment("职务等级");

                entity.Property(e => e.DName)
                    .HasMaxLength(50)
                    .HasColumnName("D_Name")
                    .HasComment("职务名称");
            });

            modelBuilder.Entity<SysErrorLog>(entity =>
            {
                entity.HasKey(e => e.ElId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_error_logs");

                entity.HasComment("错误日志表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.ElId)
                    .HasMaxLength(32)
                    .HasColumnName("EL_ID");

                entity.Property(e => e.ElApi)
                    .HasMaxLength(200)
                    .HasColumnName("EL_Api")
                    .HasComment("引发错误的接口地址");

                entity.Property(e => e.ElCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("EL_CreateTime")
                    .HasComment("操作时间");

                entity.Property(e => e.ElDesc)
                    .HasMaxLength(255)
                    .HasColumnName("EL_Desc")
                    .HasComment("备用");

                entity.Property(e => e.ElIp)
                    .HasMaxLength(20)
                    .HasColumnName("EL_Ip")
                    .HasComment("请求IP");

                entity.Property(e => e.ElMessage)
                    .HasMaxLength(999)
                    .HasColumnName("EL_Message")
                    .HasComment("错误消息");

                entity.Property(e => e.ElParams)
                    .HasMaxLength(999)
                    .HasColumnName("EL_Params")
                    .HasComment("本次请求的参数");

                entity.Property(e => e.ElUid)
                    .HasMaxLength(32)
                    .HasColumnName("EL_UID")
                    .HasComment("用户ID");
            });

            modelBuilder.Entity<SysLoginLog>(entity =>
            {
                entity.HasKey(e => e.LlId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_login_logs");

                entity.HasComment("登录日志")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.LlId)
                    .HasMaxLength(32)
                    .HasColumnName("LL_ID")
                    .HasComment("ID");

                entity.Property(e => e.LlCode)
                    .HasMaxLength(32)
                    .HasColumnName("LL_Code")
                    .HasComment("生成的凭据");

                entity.Property(e => e.LlCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("LL_CreateTime")
                    .HasComment("登录时间");

                entity.Property(e => e.LlExplain)
                    .HasMaxLength(200)
                    .HasColumnName("LL_Explain")
                    .HasComment("描述");

                entity.Property(e => e.LlIp)
                    .HasMaxLength(99)
                    .HasColumnName("LL_IP")
                    .HasComment("登录IP");

                entity.Property(e => e.LlResult)
                    .HasColumnName("LL_Result")
                    .HasComment("登录结果");

                entity.Property(e => e.LlType)
                    .HasMaxLength(50)
                    .HasColumnName("LL_Type")
                    .HasComment("登录类型");

                entity.Property(e => e.LlUid)
                    .HasMaxLength(32)
                    .HasColumnName("LL_UID")
                    .HasComment("用户ID");
            });

            modelBuilder.Entity<SysRight>(entity =>
            {
                entity.HasKey(e => e.RId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_rights");

                entity.HasComment("权限表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.RId)
                    .HasMaxLength(32)
                    .HasColumnName("R_ID")
                    .HasComment("ID");

                entity.Property(e => e.RCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("R_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.RDesc)
                    .HasMaxLength(255)
                    .HasColumnName("R_Desc")
                    .HasComment("备用");

                entity.Property(e => e.RExplain)
                    .HasMaxLength(99)
                    .HasColumnName("R_Explain")
                    .HasComment("描述");

                entity.Property(e => e.RIcon)
                    .HasMaxLength(99)
                    .HasColumnName("R_Icon")
                    .HasComment("图标");

                entity.Property(e => e.RIsBan)
                    .HasColumnName("R_IsBan")
                    .HasComment("是否已禁用");

                entity.Property(e => e.RIsDel)
                    .HasColumnName("R_IsDel")
                    .HasComment("是否删除");

                entity.Property(e => e.RIsMenu)
                    .HasColumnName("R_IsMenu")
                    .HasComment("是否会出现在菜单");

                entity.Property(e => e.RIsPublic)
                    .HasColumnName("R_IsPublic")
                    .HasComment("是否公开权限");

                entity.Property(e => e.RIsPublish)
                    .HasColumnName("R_IsPublish")
                    .HasComment("是否发布");

                entity.Property(e => e.RName)
                    .HasMaxLength(20)
                    .HasColumnName("R_Name")
                    .HasComment("名chen/菜单名");

                entity.Property(e => e.RNo)
                    .HasColumnName("R_No")
                    .HasComment("序号");

                entity.Property(e => e.RParentRid)
                    .HasMaxLength(32)
                    .HasColumnName("R_ParentRID")
                    .HasComment("上级权限ID");

                entity.Property(e => e.RState)
                    .HasColumnName("R_State")
                    .HasComment("状态");

                entity.Property(e => e.RUrl)
                    .HasMaxLength(50)
                    .HasColumnName("R_Url")
                    .HasComment("地址");
            });

            modelBuilder.Entity<SysRightConfig>(entity =>
            {
                entity.HasKey(e => e.RcId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_right_config");

                entity.HasComment("权限-配置表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.RcId)
                    .HasMaxLength(32)
                    .HasColumnName("RC_ID")
                    .HasComment("ID");

                entity.Property(e => e.RcCount)
                    .HasColumnName("RC_Count")
                    .HasComment("包含权限数量");

                entity.Property(e => e.RcCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RC_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.RcDesc)
                    .HasMaxLength(255)
                    .HasColumnName("RC_Desc")
                    .HasComment("备用");

                entity.Property(e => e.RcIsBan)
                    .HasColumnName("RC_IsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.RcIsPublish)
                    .HasColumnName("RC_IsPublish")
                    .HasComment("是否发布");

                entity.Property(e => e.RcName)
                    .HasMaxLength(20)
                    .HasColumnName("RC_Name")
                    .HasComment("配置名");

                entity.Property(e => e.RcState)
                    .HasColumnName("RC_State")
                    .HasComment("状态");
            });

            modelBuilder.Entity<SysRightConfigDetail>(entity =>
            {
                entity.HasKey(e => e.RcdId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_right_config_details");

                entity.HasComment("权限配置关联表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.RcdId)
                    .HasMaxLength(32)
                    .HasColumnName("RCD_ID")
                    .HasComment("配置详情ID");

                entity.Property(e => e.RcdCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RCD_CreateTime")
                    .HasComment("时间");

                entity.Property(e => e.RcdRcid)
                    .HasMaxLength(999)
                    .HasColumnName("RCD_RCID")
                    .HasComment("配置ID");

                entity.Property(e => e.RcdRid)
                    .HasMaxLength(32)
                    .HasColumnName("RCD_RID")
                    .HasComment("权限ID");
            });

            modelBuilder.Entity<SysRightConfigOrg>(entity =>
            {
                entity.HasKey(e => e.RcoId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_right_config_org");

                entity.HasComment("权限配置关联部门表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.RcoId)
                    .HasMaxLength(32)
                    .HasColumnName("RCO_ID")
                    .HasComment("配置部门关联ID");

                entity.Property(e => e.RcoCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RCO_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.RcoDeptId)
                    .HasMaxLength(32)
                    .HasColumnName("RCO_DeptID")
                    .HasComment("部门ID");

                entity.Property(e => e.RcoDutyId)
                    .HasMaxLength(32)
                    .HasColumnName("RCO_DutyID")
                    .HasComment("岗位ID");

                entity.Property(e => e.RcoIsAllDuties)
                    .HasColumnName("RCO_IsAllDuties")
                    .HasComment("是否所有岗位生效");

                entity.Property(e => e.RcoIsPublish)
                    .HasColumnName("RCO_IsPublish")
                    .HasComment("是否发布");

                entity.Property(e => e.RcoRcid)
                    .HasMaxLength(32)
                    .HasColumnName("RCO_RCID")
                    .HasComment("配置ID");
            });

            modelBuilder.Entity<SysUser>(entity =>
            {
                entity.HasKey(e => e.UId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_users");

                entity.HasComment("用户表")
                    .UseCollation("utf8mb4_general_ci");

                entity.HasIndex(e => e.UAccount, "U_Account")
                    .IsUnique();

                entity.Property(e => e.UId)
                    .HasMaxLength(32)
                    .HasColumnName("U_ID")
                    .HasComment("用户ID");

                entity.Property(e => e.UAccount)
                    .HasMaxLength(32)
                    .HasColumnName("U_Account")
                    .HasComment("用户账号			");

                entity.Property(e => e.UCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("U_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.UDept)
                    .HasMaxLength(32)
                    .HasColumnName("U_Dept")
                    .HasComment("部门ID");

                entity.Property(e => e.UDesc)
                    .HasMaxLength(255)
                    .HasColumnName("U_Desc")
                    .HasComment("备用");

                entity.Property(e => e.UDuty)
                    .HasMaxLength(32)
                    .HasColumnName("U_Duty")
                    .HasComment("岗位ID");

                entity.Property(e => e.UGender)
                    .HasMaxLength(20)
                    .HasColumnName("U_Gender")
                    .HasComment("性别");

                entity.Property(e => e.UIsActive)
                    .HasColumnName("U_IsActive")
                    .HasComment("是否激活");

                entity.Property(e => e.UIsBan)
                    .HasColumnName("U_IsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.UName)
                    .HasMaxLength(20)
                    .HasColumnName("U_Name")
                    .HasComment("名字");

                entity.Property(e => e.UPassword)
                    .HasMaxLength(32)
                    .HasColumnName("U_Password")
                    .HasComment("密码");

                entity.Property(e => e.USalt)
                    .HasMaxLength(32)
                    .HasColumnName("U_Salt")
                    .HasComment("盐");
            });

            modelBuilder.Entity<SysUserInfo>(entity =>
            {
                entity.HasKey(e => e.UId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_user_info");

                entity.HasComment("用户信息表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.UId)
                    .HasMaxLength(32)
                    .HasColumnName("U_ID")
                    .HasComment("用户ID");

                entity.Property(e => e.UActiveTime)
                    .HasColumnType("datetime")
                    .HasColumnName("U_Active_Time")
                    .HasComment("激活时间");

                entity.Property(e => e.UBanTime)
                    .HasColumnType("datetime")
                    .HasColumnName("U_Ban_Time")
                    .HasComment("禁用时间");

                entity.Property(e => e.UBirthday)
                    .HasColumnType("datetime")
                    .HasColumnName("U_Birthday")
                    .HasComment("生日");

                entity.Property(e => e.UEmail)
                    .HasMaxLength(200)
                    .HasColumnName("U_Email")
                    .HasComment("邮箱");

                entity.Property(e => e.UGender)
                    .HasMaxLength(2)
                    .HasColumnName("U_Gender")
                    .HasComment("性别");

                entity.Property(e => e.UNick)
                    .HasMaxLength(50)
                    .HasColumnName("U_Nick")
                    .HasComment("昵称");

                entity.Property(e => e.UQq)
                    .HasMaxLength(20)
                    .HasColumnName("U_QQ")
                    .HasComment("QQ");

                entity.Property(e => e.UWeChat)
                    .HasMaxLength(50)
                    .HasColumnName("U_WeChat")
                    .HasComment("微信");
            });

            modelBuilder.Entity<SysUserRight>(entity =>
            {
                entity.HasKey(e => e.UrId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_user_rights");

                entity.HasComment("用户-权限-关联表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.UrId)
                    .HasMaxLength(32)
                    .HasColumnName("UR_ID")
                    .HasComment("关联ID");

                entity.Property(e => e.UrBeginTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UR_BeginTime")
                    .HasComment("权限生效时间");

                entity.Property(e => e.UrCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UR_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.UrDesc)
                    .HasMaxLength(255)
                    .HasColumnName("UR_Desc")
                    .HasComment("备用");

                entity.Property(e => e.UrOutTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UR_OutTime")
                    .HasComment("权限过期时间");

                entity.Property(e => e.UrRid)
                    .HasMaxLength(32)
                    .HasColumnName("UR_RID")
                    .HasComment("权限ID");

                entity.Property(e => e.UrUid)
                    .HasMaxLength(32)
                    .HasColumnName("UR_UID")
                    .HasComment("用户ID");
            });

            modelBuilder.Entity<SysVerify>(entity =>
            {
                entity.HasKey(e => e.VId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_verify");

                entity.HasComment("验证码")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.VId)
                    .HasMaxLength(32)
                    .HasColumnName("V_ID")
                    .HasComment("ID");

                entity.Property(e => e.VCode)
                    .HasMaxLength(8)
                    .HasColumnName("V_Code")
                    .HasComment("发送的验证码");

                entity.Property(e => e.VCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("V_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.VDesc)
                    .HasMaxLength(255)
                    .HasColumnName("V_Desc")
                    .HasComment("备用");

                entity.Property(e => e.VIsUse)
                    .HasColumnName("V_IsUse")
                    .HasComment("是否使用");

                entity.Property(e => e.VOutTime)
                    .HasColumnType("datetime")
                    .HasColumnName("V_OutTime")
                    .HasComment("过期时间");

                entity.Property(e => e.VPhone)
                    .HasMaxLength(11)
                    .HasColumnName("V_Phone")
                    .HasComment("电话");

                entity.Property(e => e.VUseTime)
                    .HasColumnType("datetime")
                    .HasColumnName("V_UseTime")
                    .HasComment("使用时间");
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
